<!-- Available Widgets Area -->
<!-- Available Widgets -->
<div id="available-widgets">
    <div id="widgets-left">
        <header class="clearfix ui-accordion-header ui-helper-reset ui-state-active ui-corner-top">
            <div></div>
            <h3><?php echo lang('widgets.available_title') ?></h3>
        </header>

        <?php if ($available_widgets): ?>
        <!-- Available Widget List -->
        <div class="widget-area-content">
            <p class="desc"><?php echo lang('widgets.instructions') ?></p>

            <div class="widget-list">
                <?php foreach ($available_widgets as $widget): ?>
                <div id="widget-<?php echo $widget->slug; ?>" class="widget-box">
                    <div class="widget-top">
                        <div class="widget-title">
                            <h4><?php echo $widget->title; ?></h4>
                        </div>
                    </div>

                    <div class="widget-description">
                        <div style="margin-bottom: 10px"><?php echo $widget->description; ?></div>
                        <div><?php echo lang('widgets.widget_author') . ': ' . ($widget->website
                                ? anchor($widget->website, $widget->author, array('target' => '_blank'))
                                : $widget->author); ?>
                        </div>
                    </div>
                </div>
                <?php endforeach; ?>
            </div>
        </div>
        <?php else: ?>
        <p><?php echo lang('widgets.no_available_widgets'); ?></p>
        <?php endif; ?>
    </div>
</div>

<!-- Widget Areas -->
<div id="widget-areas">
    <?php if ($widget_areas): ?>
    <!-- Available Widget Areas -->
    <div id="widget-areas-list">
        <?php $this->load->view('admin/areas/index', compact('widget_areas')); ?>
    </div>
    <?php else: ?>
    <p><?php echo lang('nav_no_groups'); ?></p>
    <?php endif; ?>
</div>